/**
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-02-23 11:05:39
 * @Description  : 系统概览相关接口路由
 */

const Router = require('koa-router')
const { verifyToken } = require('@/utils/jwt')
const { verifyAuth } = require('@/middlewares/authMiddlewares/verifyAuth')
const overviewValidate = require('@/middlewares/validateMiddlewares/systemOverviewValidate')
const overviewController = require('@/controller/systemOverview')
const router = new Router()
/**
 * 获取概览信息
 */
router.get(
  '/info',
  verifyToken(),
  verifyAuth(['admin.index.dashborad']),
  overviewController.listSystemOverview
)

/**
 * 获取用户空间使用
 */

router.get(
  '/spaceChart',
  verifyToken(),
  verifyAuth(['admin.index.dashborad']),
  overviewValidate.listSpaceChartValidate,
  overviewController.listSpaceChart
)

/**
 * 获取用户的数据情况，总数，增长，登录
 */
router.get(
  '/userData',
  verifyToken(),
  verifyAuth(['admin.index.dashborad']),
  overviewController.listUserData
)

module.exports = router
